<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width"/>
</head>
<html>
<body>
<h1 id="text">这是一个测试信息，默认字体为黑色，原生侧调用runJavaScript方法后字体变颜色</h1>
<script>
    // 调用有参函数时实现
    function changeColor2(param) {
        document.getElementById('text').style.color = `${param}`;
        console.log(param);
    }
    // 调用无参函数时实现
    function changeColor() {
        document.getElementById('text').style.color = 'green';
    }
</script>
</body>
</html>